A theory of program refinement

نویسنده

  • Ewen Denney
چکیده

We give a canonical program refinement calculus based on the lambda calculus and classical first-order predicate logic, and study its proof theory and semantics. The intention is to construct a metalanguage for refinement in which basic principles of program development can be studied. The idea is that it should be possible to induce a refinement calculus in a generic manner from a programming language and a program logic. For concreteness, we adopt the simply-typed lambda calculus augmented with primitive recursion as a paradigmatic typed functional programming language, and use classical first-order logic as a simple program logic. A key feature is the construction of the refinement calculus in a modular fashion, as the combination of two orthogonal extensions to the underlying programming language (in this case, the simply-typed lambda calculus). The crucial observation is that a refinement calculus is given by extending a programming language to allow indeterminate expressions (or ‘stubs’) involving the construction ‘some program x such that P ’. Factoring this into ‘some x . . .’ and ‘. . . such that P ’, we first study extensions to the lambda calculus providing separate analyses of what we might call ‘true’ stubs, and structured specifications. The questions we are concerned with in these calculi are how do stubs interact with the programming language, and what is a suitable notion of structured specification for program development. The full refinement calculus is then constructed in a natural way as the combination of these two subcalculi. The claim that the subcalculi are orthogonal extensions to the lambda calculus is justified by a result that a refinement can actually be factored into simpler judgements in the subcalculi, that is, into logical reasoning and simple decomposition. The semantics for the calculi are given using Henkin models with additional structure. Both simply-typed lambda calculus and first-order logic are interpreted using Henkin models themselves. The two subcalculi require some extra structure and the full refinement calculus is modelled by Henkin models with a combination of these extra requirements. There are soundness and completeness results for each calculus, and by virtue of there being certain embeddings of models we can infer that the refinement calculus is a conservative extension of both of the subcalculi which, in turn, are conservative extensions of the lambda calculus.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Refinement to the Existing Analytical Methods of Analysis of Buried Pipelines due to Strike-Slip Faulting

Analytical methods presented to analyze the buried steel pipelines at strike-slip fault crossing use the Euler-Bernoulli beam theory. The cross-section of a buried pipe that is completely surrounded by soil cannot rotate freely and would not be remained perpendicular to the bending line after deformation. So it would be better to take into consideration a rotation between the cross-section and ...

متن کامل

Program Derivation Using the Refinement Calculator

The refinement calculus provides a theory for the stepwise refinement of programs and this theory has been formalised in HOL. TkWinHOL is a powerful graphical user interface (GUI) that can be used to drive the HOL window Library. In this paper, we describe a tool called the Refinement Calculator which combines TkWinHOL and the HOL Refinement Calculus theory, to provide support for formal progra...

متن کامل

Computer-aided development of a real-time program

The refinement calculus is a well-established theory for formal development of imperative program code and is supported by a number of automated tools. Via a detailed case study, this article shows how refinement theory and tool support can be extended for a program with real-time constraints. The approach adapts a timed variant of the refinement calculus and makes corresponding enhancements to...

متن کامل

Microstructure and Grain Refining Performance of a New Al-Ti-C Master Alloy (RESEARCH NOTE)

Control of microstructure parameters that affecting the Al-Ti-C master alloys grain refining efficiency is leading to improve the aluminum grain refinement. This study was an attempt to produce Al-Ti-C master alloys that provide these controlling factors with relying on the solute effect theory. The produced master alloys were examined by using scanning electron microscopy (SEM), energy-dispers...

متن کامل

Verification, refinement and scheduling of real-time programs

A real-time program can be developed by refining a specification into program code. Verification of the timing properties of the program is then usually done at two levels: verification of the ordering of timed actions in the program and proof that execution of the program on a specific system will meet its timing requirements. Refinement is done within a formal model but the second step requir...

متن کامل

Integrating Real-Time Scheduling Theory and Program Refinement

Abs t rac t . We show how real-time schedulability tests and program refinement rules can be integrated to create a formal development method of practical use to real-time programmers. A computational model for representing task scheduling is developed within a 'timed' refinement calculus. Proven multi-tasking schedulability tests then become available as feasibility checks during system refine...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999